package com.ifonly.ar.helpers;

import java.util.Arrays;

/**
 * @author ifonly
 * @version 1.0 2015-12-06 20:47
 * @since JDK 1.6
 */
public class SqlInfo {

    private String sql;
    private Object[] params;

    public SqlInfo(String sql, Object[] params) {
        this.sql = sql;
        this.params = params;
    }

    public String getSql() {
        return sql;
    }

    public Object[] getParams() {
        if (params == null) {
            params = new Object[0];
        }
        return params;
    }

    @Override
    public String toString() {
        return "SqlInfo{" +
                "sql='" + sql + '\'' +
                ", params=" + Arrays.toString(params) +
                '}';
    }
}
